home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 3: The Continuation / 17-Bit_The_Continuation_Disc.iso / files / nz18.dms / nz18.adf / BASIC to Hardware / ProtectCheck < prev    next >
Text File  |  1993-12-03  |  383b  |  20 lines

  1. 'This program checks to see if a disk is write protected
  2. 'From J.Murphy
  3. 'Checks Track0, Ready and WriteProtect signals
  4.  
  5. PRINT "Write protect check"
  6. PRINT "Insert a disk..."
  7. a&=&HBFE*&H1000+1:REM Address of CIAA
  8.  
  9. start:
  10. p=PEEK(a&)
  11. IF ((p AND 32)=0) AND ((p AND 16)=0) THEN
  12.   IF (p AND 8)=0 THEN
  13.     PRINT "Write protected"
  14.   ELSE
  15.     PRINT "Write enabled"
  16.   END IF
  17. END IF
  18. GOTO start
  19.  
  20.